
#KERNELDIR :=/lib/modules/$(shell uname -r)/build
KERNELDIR :=/home/linux/fs4412/kernel/linux-3.14
PWD  :=$(shell pwd)

CROSS_COMPILE=arm-linux-
#CROSS_COMPILE=
CC=$(CROSS_COMPILE)gcc
CP=cp

ARM_DRVDIR=~/fs4412/sync/rootfs/drv/

obj-m += mpu6050_driver.o 

all:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
	$(CC) -o mpu6050_test mpu6050_test.c
	mv *.o *.mod.c *.order *.symvers obj

install:
	sudo cp *.ko mpu6050_test $(ARM_DRVDIR)

clean:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
	rm -rf cgi_led.cgi


